import { CONTAIN_SUB } from '@/enum/modules/public'
import type {
  CalculationStatusMonitoringSelectCalculationStatusPageParams as A,
  TableColumn,
} from '@/types'
import { PAGING } from '@/constant'

export const defaultColumns: TableColumn<any>[] = [
  {
    key: uuid(),
    type: 'index',
    width: '80',
    label: '序号',
    fixed: 'left',
  },
  {
    key: uuid(),
    label: '指标名称',
    fixed: 'left',
    prop: 'indicatorName',
    minWidth: '160px',
  },
  {
    key: uuid(),
    label: '指标编码',
    fixed: 'left',
    width: '300',
    prop: 'indicatorNumber',
    render: ({ row }) => h(
      'code',
      row.indicatorNumber,
    ),
  },
]

export const defaultPagingParams: Partial<A> = {
  ...PAGING.PARAMS,
  key: '0m',
  dataTime: undefined,
  pointId: 0,
  name: '',
  containSub: CONTAIN_SUB.NO_SUB,
}

export const treeOrgConfig = {
  collapsable: false,
  onlyOneNode: false,
  expandAll: true,
  disaled: false,
  center: true,
  nodeDraggable: false,
  cloneNodeDrag: false,
  // defaultExpandLevel: 10,
  defineMenus: [],
  style: {
    background: '#fff',
    color: '#5e6d82',
  },
  props: {
    label: 'indicatorNumber',
    children: 'dependList',
    id: 'indicatorNumber',
    pid: 'pid',
  },
}
